//
//  FirstViewController.m
//  QQ13
//
//  Created by KM on 16/10/13.
//  Copyright © 2016年 KM. All rights reserved.
//

#import "FirstViewController.h"
#import "LeftCell.h"
#import "NightCell.h"
@interface FirstViewController ()

@end

@implementation FirstViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.tableView.rowHeight = UITableViewAutomaticDimension;
    self.tableView.estimatedRowHeight = 44;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 2;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    if (indexPath.row %2 == 0)
    {
        LeftCell *cell = [tableView dequeueReusableCellWithIdentifier:@"leftchat" forIndexPath:indexPath];
        cell.qipao.image = [cell.qipao.image resizableImageWithCapInsets:UIEdgeInsetsMake(30, 30, 15, 30)];
        cell.lab.text = @"cjdkslajfkdlsj bnhgjmhgmn ,mn.knm,.m ,njmbhnb n  bngfnhhvbngvygn";
        return cell;
    }
    else
    {
        NightCell *ce = [tableView dequeueReusableCellWithIdentifier:@"nightchat" forIndexPath:indexPath];
        ce.qipao2.image = [ce.qipao2.image resizableImageWithCapInsets:UIEdgeInsetsMake(30, 30, 15, 30)];
        ce.lab2.text = @"bvc";
        return ce;
    }
  
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
